<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common.jsp"%>
<html>
	<head>	
		<script type="text/javascript">
			Ext.onReady(function(){
				var tb = new Ext.Toolbar({
				    renderTo: Ext.get('tbar'),
				    items: [
				        {
				            text: '查询',
				            icon:"<%=contextPath%>/" + "images/query.gif",
				            handler:function(){
				            	cmt();
				            }
				        }]
				});
			});
		</script>
	</head>
	<body>
		<div id ='tbar'></div>
        <br>
		<div id="Layer" style="position:absolute;display:block left:0px; top:35px; width:100%; height:94%; z-index:1000; overflow:auto;">
		<form id="frmM" class="ct" name="frmM" method="POST" action="">
			<table width="100%" id="contab">
				<tr>
					<th>任务单号</th>
					<td><input type="text" name="searchBean().con4"></td>
					<th>负责人</th>
					<td><input type="text" name="searchBean().con5"></td>
				</tr>
			</table>
			<table width="100%" height="30">
				<tr>
					<td colspan="4" align="center">
						工作记录
					</td>
				</tr>
			</table>
			<hr>
			<hr>
			<table width="100%" id="listtab">
				<tr ondblclick="">
					<th>任务单号</th>
					<th>变电站</th>
					<th>开始时间</th>
					<th>结束时间</th>
					<th>负责人</th>
					<th>工作成员</th>
					<th>记录人</th>
					<th>记录日期</th>
					<th>班组</th>					
				</tr>
				<c:forEach items="${list}" var="Tab" varStatus="status">
					<tr ondblclick="javascript:toDetail(${Tab.id})">
						<td>${Tab.gzrwdid}</td>
						<td>${Tab.bdzname}</td>
						<td><fmt:formatDate value="${Tab.kssj}" pattern="yyyy-MM-dd HH:mm"/></td>
						<td><fmt:formatDate value="${Tab.jssj}" pattern="yyyy-MM-dd HH:mm"/></td>
						<td>${Tab.fzr}</td>
						<td>${Tab.gzcy}</td>	
						<td>${Tab.jlr}</td>
						<td><fmt:formatDate value="${Tab.jlrq}" pattern="yyyy-MM-dd HH:mm"/></td>																	
						<td>
							<c:choose>
								<c:when test="${Tab.bzlb == '1'}">继电保护</c:when>
								<c:when test="${Tab.bzlb == '2'}">设备检修</c:when>
								<c:when test="${Tab.bzlb == '3'}">变压器</c:when>
								<c:when test="${Tab.bzlb == '4'}">设备试验</c:when>
							</c:choose>
						</td>
					</tr>
				</c:forEach>
				<c:if test="${list == null || fn:length(list) == 0 }">
					<tr>
						<td colspan="12" style="text-align: center">
							无记录
						</td>
					</tr>
				</c:if>
			</table>
			<table width="100%" id="tablestyle2">
				<tr>
					<td>
						<hr />
					</td>
				</tr>
				<tr>
					<td>${pageDown}</td>
				</tr>
			</table>
		</form>
		</div>
	</body>
<script>
	function cmt(){
		document.frmM.action = "<%=contextPath%>/gzjlList!getList.do?page=1&c=c";
		document.frmM.submit();
	}
	function toDetail(id){
		document.frmM.action = "<%=contextPath%>/gzjl!toDetailEdit.do?entity.id=" + id;
		document.frmM.submit();
	}
</script>
</html>
